Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify the logic of switch and some names. #176

Merged
merged 10 commits into from
Jul 24, 2023

Conversation

NaHCO3bc
Copy link
Contributor

@NaHCO3bc NaHCO3bc commented Jul 9, 2023

根据凯子哥修改的代码修改了一些逻辑bug,在init中解决刚开始id2射频为0的的问题

@NaHCO3bc
Copy link
Contributor Author

以上的修改都没问题了。
之前因为稳态误差和一些参数没调好导致切枪之后不push的问题,加了两个持续时间的判断,类似于进入block的判断,跟那两个阈值的判断放在一起,用或的关系
一个是拨盘位置误差导致不切枪,可能是在切枪前拨盘卡弹导致的,做法是记录上一次setmode为push的时间,跟当前时间作差,大于设置的持续时间就切枪
第二个是枪管位置的稳态误差导致的,切完枪之后不push,做法是切枪的cmdsender sencommand之后,记录时间,跟当前时间作差,大于设置的持续时间就重新push
不过目前切枪的表现挺好的就暂时没有出现原来的bug,相当于新代码可能没测到,所以看看你们觉得有没有必要加这些 @ye-luo-xi-tui @Edwinlinks

@Edwinlinks
Copy link
Contributor

以上的修改都没问题了。 之前因为稳态误差和一些参数没调好导致切枪之后不push的问题,加了两个持续时间的判断,类似于进入block的判断,跟那两个阈值的判断放在一起,用或的关系 一个是拨盘位置误差导致不切枪,可能是在切枪前拨盘卡弹导致的,做法是记录上一次setmode为push的时间,跟当前时间作差,大于设置的持续时间就切枪 第二个是枪管位置的稳态误差导致的,切完枪之后不push,做法是切枪的cmdsender sencommand之后,记录时间,跟当前时间作差,大于设置的持续时间就重新push 不过目前切枪的表现挺好的就暂时没有出现原来的bug,相当于新代码可能没测到,所以看看你们觉得有没有必要加这些 @ye-luo-xi-tui @Edwinlinks

这部分改动是还没有push的?

@Edwinlinks
Copy link
Contributor

暂时没有出现原来的bug

“暂时没有出现原来的bug”是指没有触发了卡弹但是依然正常还是指后面没有再卡过弹了?

@Edwinlinks
Copy link
Contributor

Edwinlinks commented Jul 14, 2023

以上的修改都没问题了。 之前因为稳态误差和一些参数没调好导致切枪之后不push的问题,加了两个持续时间的判断,类似于进入block的判断,跟那两个阈值的判断放在一起,用或的关系 一个是拨盘位置误差导致不切枪,可能是在切枪前拨盘卡弹导致的,做法是记录上一次setmode为push的时间,跟当前时间作差,大于设置的持续时间就切枪 第二个是枪管位置的稳态误差导致的,切完枪之后不push,做法是切枪的cmdsender sencommand之后,记录时间,跟当前时间作差,大于设置的持续时间就重新push 不过目前切枪的表现挺好的就暂时没有出现原来的bug,相当于新代码可能没测到,所以看看你们觉得有没有必要加这些 @ye-luo-xi-tui @Edwinlinks

假如确实是这两个问题引起的,那这个逻辑还是蛮有必要的,你要做到在该切枪管的时候发生了任何意外都能尽可能正常切吧我觉得

@NaHCO3bc
Copy link
Contributor Author

以上的修改都没问题了。 之前因为稳态误差和一些参数没调好导致切枪之后不push的问题,加了两个持续时间的判断,类似于进入block的判断,跟那两个阈值的判断放在一起,用或的关系 一个是拨盘位置误差导致不切枪,可能是在切枪前拨盘卡弹导致的,做法是记录上一次setmode为push的时间,跟当前时间作差,大于设置的持续时间就切枪 第二个是枪管位置的稳态误差导致的,切完枪之后不push,做法是切枪的cmdsender sencommand之后,记录时间,跟当前时间作差,大于设置的持续时间就重新push 不过目前切枪的表现挺好的就暂时没有出现原来的bug,相当于新代码可能没测到,所以看看你们觉得有没有必要加这些 @ye-luo-xi-tui @Edwinlinks

这部分改动是还没有push的?

在另外一个分支上

@NaHCO3bc
Copy link
Contributor Author

暂时没有出现原来的bug

“暂时没有出现原来的bug”是指没有触发了卡弹但是依然正常还是指后面没有再卡过弹了?

主要是指切完之后不push 但也没有卡弹

@NaHCO3bc
Copy link
Contributor Author

最新的commit就是加了持续时间判断的,添加的相关参数也会pr

rm_common/include/rm_common/decision/command_sender.h Outdated Show resolved Hide resolved
bool is_double_barrel_{ false }, switch_barrel_{ false }, switch_done_{ true };
bool is_double_barrel_{ false }, need_switch_{ false }, is_switching_{ false };
ros::Time last_switch_time_, last_push_time_;
double ready_duration_, is_switching_duration_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥叫ready_duration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥叫ready_duration?

因为在这段时间里 shooter都是在ready中

@ye-luo-xi-tui
Copy link
Member

微信上让你参数化的参数我和凯子也拿不准主意,你今天之内想一个push上来看看

@NaHCO3bc
Copy link
Contributor Author

写了一个,你看看 @ye-luo-xi-tui

@ye-luo-xi-tui
Copy link
Member

@Edwinlinks

barrel_nh.getParam("restart_push_threshold", restart_push_threshold_);
barrel_nh.getParam("cooling_threshold", cooling_threshold_);
barrel_nh.getParam("current_id_frequency_threshold", current_id_fre_threshold_);
barrel_nh.getParam("current_id_frequency_threshold", another_id_fre_threshold_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该一个参数就行了吧?为啥要两个

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该一个参数就行了吧?为啥要两个

因为叶子哥说频率等于0的条件太苛刻了,要参数化

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该一个参数就行了吧?为啥要两个

因为叶子哥说频率等于0的条件太苛刻了,要参数化

凯子意思是说你两个变量都读同一个参数,一个变量就够了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该一个参数就行了吧?为啥要两个

因为叶子哥说频率等于0的条件太苛刻了,要参数化

凯子意思是说你两个变量都读同一个参数,一个变量就够了

嘶那是我写错了,应该读的是不同的参数

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所以是打算用同一个参数还是怎么样

@ye-luo-xi-tui ye-luo-xi-tui merged commit 849008a into rm-controls:double_barrel Jul 24, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants